main: main.c say.c
	gcc -fPIC -shared  say.c -o say.so  #compile say.c to dynamic library say.so
	mv say.so ./lib
	gcc main.c ./lib/say.so -o main     #compile main program
	ldd main                            #check the so main depends on.

.PHONY: clean run check
clean:
	rm -f main ./lib/say.so
run:
	./main
check:
	strings main
